<UserControl x:Class="Microsoft.Robotics.Manipulation.Visualization.JointControllerDisplayView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Margin="0,0,-690,-288" RenderTransformOrigin="0.501,0.541">
        <Grid Margin="25,62,0,-37" HorizontalAlignment="Left" Width="340">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="250"/>
                <ColumnDefinition Width="262*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
            </Grid.RowDefinitions>
            <Slider x:Name="JointPositionSlider0" Grid.Column="0" Grid.Row="0" Margin="10,0,0,0" VerticalAlignment="Top" Height="27" Maximum="3.14" Minimum="-3.14" LargeChange="0.1" SmallChange="0.01" TickFrequency="0.5" Value="0" HorizontalAlignment="Left" Width="234" ValueChanged="JointPositionSlider_ValueChanged" Tag="0"/>
            <TextBox x:Name="JointPositionTextBox0" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left" Height="23" Margin="10,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="63" Text="0" LostFocus="JointPositionTextBox_LostFocus" KeyDown="JointPositionTextBox_KeyDown" Tag="0"/>

            <Slider x:Name="JointPositionSlider1" Grid.Column="0" Grid.Row="1" Margin="10,0,0,0" VerticalAlignment="Top" Height="27" Maximum="3.14" Minimum="-3.14" LargeChange="0.1" SmallChange="0.01" TickFrequency="0.5" Value="0" HorizontalAlignment="Left" Width="234" ValueChanged="JointPositionSlider_ValueChanged" Tag="1"/>
            <TextBox x:Name="JointPositionTextBox1" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Height="23" Margin="10,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="63" Text="0" LostFocus="JointPositionTextBox_LostFocus" KeyDown="JointPositionTextBox_KeyDown" Tag="1"/>

            <Slider x:Name="JointPositionSlider2" Grid.Column="0" Grid.Row="2" Margin="10,0,0,0" VerticalAlignment="Top" Height="27" Maximum="3.14" Minimum="-3.14" LargeChange="0.1" SmallChange="0.01" TickFrequency="0.5" Value="0" HorizontalAlignment="Left" Width="234" ValueChanged="JointPositionSlider_ValueChanged" Tag="2"/>
            <TextBox x:Name="JointPositionTextBox2" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left" Height="23" Margin="10,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="63" Text="0" LostFocus="JointPositionTextBox_LostFocus" KeyDown="JointPositionTextBox_KeyDown" Tag="2"/>

            <Slider x:Name="JointPositionSlider3" Grid.Column="0" Grid.Row="3" Margin="10,0,0,0" VerticalAlignment="Top" Height="27" Maximum="3.14" Minimum="-3.14" LargeChange="0.1" SmallChange="0.01" TickFrequency="0.5" Value="0" HorizontalAlignment="Left" Width="234" ValueChanged="JointPositionSlider_ValueChanged" Tag="3"/>
            <TextBox x:Name="JointPositionTextBox3" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" Height="23" Margin="10,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="63" Text="0" LostFocus="JointPositionTextBox_LostFocus" KeyDown="JointPositionTextBox_KeyDown" Tag="3"/>

            <Slider x:Name="JointPositionSlider4" Grid.Column="0" Grid.Row="4" Margin="10,0,0,0" VerticalAlignment="Top" Height="27" Maximum="3.14" Minimum="-3.14" LargeChange="0.1" SmallChange="0.01" TickFrequency="0.5" Value="0" HorizontalAlignment="Left" Width="234" ValueChanged="JointPositionSlider_ValueChanged" Tag="4"/>
            <TextBox x:Name="JointPositionTextBox4" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Left" Height="23" Margin="10,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="63" Text="0" LostFocus="JointPositionTextBox_LostFocus" KeyDown="JointPositionTextBox_KeyDown" Tag="4"/>

            <Slider x:Name="JointPositionSlider5" Grid.Column="0" Grid.Row="5" Margin="10,0,0,0" VerticalAlignment="Top" Height="27" Maximum="3.14" Minimum="-3.14" LargeChange="0.1" SmallChange="0.01" TickFrequency="0.5" Value="0" HorizontalAlignment="Left" Width="234" ValueChanged="JointPositionSlider_ValueChanged" Tag="5"/>
            <TextBox x:Name="JointPositionTextBox5" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" Height="23" Margin="10,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="63" Text="0" LostFocus="JointPositionTextBox_LostFocus" KeyDown="JointPositionTextBox_KeyDown" Tag="5"/>

            <Slider x:Name="JointPositionSlider6" Grid.Column="0" Grid.Row="6" Margin="10,0,0,0" VerticalAlignment="Top" Height="27" Maximum="3.14" Minimum="-3.14" LargeChange="0.1" SmallChange="0.01" TickFrequency="0.5" Value="0" HorizontalAlignment="Left" Width="234" ValueChanged="JointPositionSlider_ValueChanged" Tag="6"/>
            <TextBox x:Name="JointPositionTextBox6" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Left" Height="23" Margin="10,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="63" Text="0" LostFocus="JointPositionTextBox_LostFocus" KeyDown="JointPositionTextBox_KeyDown" Tag="6"/>
        </Grid>
        <CheckBox Content="EnablePositionSending" HorizontalAlignment="Left" Margin="365,65,0,0" VerticalAlignment="Top" IsChecked="{Binding EnablePositionCommands}" />
        <Button Content="Get Actual Positions" HorizontalAlignment="Left" Margin="365,86,0,0" VerticalAlignment="Top" Width="118" Click="UpdateJointPositionsFromActual" />
        <Grid  HorizontalAlignment="Left" VerticalAlignment="Top"  Width="400" Height="320" Margin="548,53,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="100"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
            </Grid.RowDefinitions>
            <Label Content="Joint #" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" RenderTransformOrigin="-0.237,0"/>
            <Label Content="P Gain" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" RenderTransformOrigin="-0.237,0"/>
            <Label Content="D Gain" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" RenderTransformOrigin="-0.237,0"/>
            <Label Content="Deadband" Grid.Row="0" Grid.Column="3" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" RenderTransformOrigin="-0.237,0"/>
            <Label Content="Max Delta" Grid.Row="0" Grid.Column="4" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" RenderTransformOrigin="-0.237,0"/>

            <TextBox x:Name="P0TextBox" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="P1TextBox" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="P2TextBox" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="P3TextBox" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="P4TextBox" Grid.Row="5" Grid.Column="1" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="P5TextBox" Grid.Row="6" Grid.Column="1" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="P6TextBox" Grid.Row="7" Grid.Column="1" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="P7TextBox" Grid.Row="8" Grid.Column="1" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>

            <TextBox x:Name="D0TextBox" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="D1TextBox" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="D2TextBox" Grid.Row="3" Grid.Column="2" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="D3TextBox" Grid.Row="4" Grid.Column="2" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="D4TextBox" Grid.Row="5" Grid.Column="2" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="D5TextBox" Grid.Row="6" Grid.Column="2" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="D6TextBox" Grid.Row="7" Grid.Column="2" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="D7TextBox" Grid.Row="8" Grid.Column="2" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>

            <TextBox x:Name="Deadband0TextBox" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="Deadband1TextBox" Grid.Row="2" Grid.Column="3" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="Deadband2TextBox" Grid.Row="3" Grid.Column="3" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="Deadband3TextBox" Grid.Row="4" Grid.Column="3" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="Deadband4TextBox" Grid.Row="5" Grid.Column="3" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="Deadband5TextBox" Grid.Row="6" Grid.Column="3" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="Deadband6TextBox" Grid.Row="7" Grid.Column="3" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>
            <TextBox x:Name="Deadband7TextBox" Grid.Row="8" Grid.Column="3" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Center"/>

            <TextBox x:Name="MaxDelta0TextBox" Grid.Row="1" Grid.Column="4" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Center"/>
            <TextBox x:Name="MaxDelta1TextBox" Grid.Row="2" Grid.Column="4" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Center"/>
            <TextBox x:Name="MaxDelta2TextBox" Grid.Row="3" Grid.Column="4" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Center"/>
            <TextBox x:Name="MaxDelta3TextBox" Grid.Row="4" Grid.Column="4" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Center"/>
            <TextBox x:Name="MaxDelta4TextBox" Grid.Row="5" Grid.Column="4" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Center"/>
            <TextBox x:Name="MaxDelta5TextBox" Grid.Row="6" Grid.Column="4" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Center"/>
            <TextBox x:Name="MaxDelta6TextBox" Grid.Row="7" Grid.Column="4" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Center"/>
            <TextBox x:Name="MaxDelta7TextBox" Grid.Row="8" Grid.Column="4" HorizontalAlignment="Center" Width="40" Height="23" Margin="0,0,0,0" TextWrapping="Wrap" Text="1" VerticalAlignment="Center"/>



            <Label Content="0" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center"/>
            <Label Content="1" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center"/>
            <Label Content="2" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center"/>
            <Label Content="3" Grid.Row="4" Grid.Column="0" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center"/>
            <Label Content="4" Grid.Row="5" Grid.Column="0" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center"/>
            <Label Content="5" Grid.Row="6" Grid.Column="0" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center"/>
            <Label Content="6" Grid.Row="7" Grid.Column="0" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center"/>

            <Button Content="Set" Grid.Row="1" Grid.Column="5" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Width="65" Tag="0" Click="SetButtonClick"/>
            <Button Content="Set" Grid.Row="2" Grid.Column="5" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Width="65" Tag="1" Click="SetButtonClick"/>
            <Button Content="Set" Grid.Row="3" Grid.Column="5" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Width="65" Tag="2" Click="SetButtonClick"/>
            <Button Content="Set" Grid.Row="4" Grid.Column="5" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Width="65" Tag="3" Click="SetButtonClick"/>
            <Button Content="Set" Grid.Row="5" Grid.Column="5" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Width="65" Tag="4" Click="SetButtonClick"/>
            <Button Content="Set" Grid.Row="6" Grid.Column="5" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Width="65" Tag="5" Click="SetButtonClick"/>
            <Button Content="Set" Grid.Row="7" Grid.Column="5" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" Width="65" Tag="6" Click="SetButtonClick"/>



        </Grid>
    </Grid>
</UserControl>
